Entertainment device using cards

ABSTRACT

A card game apparatus  12  includes an image sensor  54 . The image sensor photographs a design ( 31 : FIG.  2 ) printed on a card  30 . A photographic signal from the image sensor is sampled by a game processor  64 , and is further re-sampled to form a photographic pixel data array. A ROM  66  is provided with a database ( 67 A: FIG.  7 ) which is assigned a comparison data array and a card ID for each entry. By searching the database based on the photographic pixel data array, the processor  64  obtains one card ID and displays card data of the card identified by the card ID on a television monitor.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a National Stage entry of International ApplicationNo. PCT/JP2004/000441 filed Jan. 20, 2003, the entire specificationclaims and drawings of which are incorporated herewith by reference.

TECHNICAL FIELD

The present invention relates to an entertainment apparatus using cards.More specifically, the present invention relates to an entertainmentapparatus using cards, which photographs a design printed on a card,identifies the card by searching a card identification database based ona photographed image, and utilizes an identification result as input fora game, etc.

PRIOR ART

Conventionally, various card game systems have been proposed in patentdocument 1 (Japanese Patent Application Laying-open No. 2001-334012),patent document 2 (Japanese Patent Application Laying-open No.2002-136766), patent document 3 (Japanese Patent Application Laying-openNo. 2002-301264) and patent document 4 (Japanese Patent ApplicationLaying-open No. 2002-224443), for example.

Patent document 1 discloses a card reading cartridge for a portable gamemachine and a card on which an identification code is printed. Patentdocument 2 discloses the determination of authenticity of a read card bya card reading apparatus and a connected game machine by accessing awebsite on the Internet. Patent document 3 discloses a large-sizedarcade game machine for a multitude of people on which, for example, asoccer game is played by use of cards on each of which a soccer playeris printed. In addition, patent document 4 proposes a card game systemthat uses cards with printed patterns invisible to the naked eye, suchas barcodes printed in ultraviolet ink.

As shown in the prior arts, in order to identify a paper card, etc. thathas no special mechanism for card identification, such as IC card andmagnetic card, it is necessary to print an identification code such asone-dimensional/two-dimensional barcode. In other words, the cardreading apparatuses according to the above mentioned prior arts cannotidentify a card on which no identifiable dedicated code is recorded inadvance. Accordingly, in playing a card game where a result of cardidentification is taken as input, for example, a dedicated card readingapparatus and card are required.

SUMMARY OF THE INVENTION

It is therefore a primary object of the present invention to provide anovel entertainment apparatus using cards.

It is another object of the present invention to provide anentertainment apparatus using cards that can identify even a card withno identification code and obtain input based on an identificationresult.

The present invention of claim 1 is an entertainment apparatus forobtaining inputs from a plurality of cards on each of which a visuallyhuman-identifiable design is printed and performing informationprocessing in accordance with the inputs. The entertainment apparatususing cards comprises a photographing means for photographing the designof the card and fetching a photographic pixel data array; a databaseincluding a plurality of entries individually corresponding to theplurality of cards, each of the entries including a pair of a card IDand a comparison data array; a card identification means for searchingthe database for a specific comparison data array based on the abovementioned photographic pixel data array and obtaining a card ID pairingup with the specific comparison data array; and an informationprocessing means for performing the information processing with the cardID obtained by the card identification means as an input.

The present invention of claim 2 is an entertainment apparatus accordingto claim 1. The photographing means includes an image sensor forphotographing a design and outputting a photographic signal, a dataarray forming means for sampling the photographic signal at a firstresolution and forming a data array, and a photographic pixel data arrayforming means for re-sampling the data array at a second resolutionwhich is lower than the first resolution and forming the photographicpixel data array. The comparison data array includes comparison datacorresponding to the second resolution.

The present invention of claim 3 is an entertainment apparatus accordingto claim 2. The card identification means calculates a distance betweenthe photographic pixel data array and the comparison data array, andobtains the card ID of the entry with the comparison data array at theshortest distance.

The present invention of claim 4 is an entertainment apparatus accordingto claim 3. The distance is a sum total of absolute values ofdifferentials between respective elements of the photographic pixel dataarray and corresponding elements of the comparison data array.

The present invention of claim 5 is an entertainment apparatus accordingto claim 3. The distance is a sum total of squares of differentialsbetween the respective elements of the photographic pixel data array andthe corresponding elements of the comparison data array.

The present invention of claim 6 is an entertainment apparatus accordingto any one of claims 2 to 5. The photographic pixel data array formingmeans forms the photographic pixel data array with assignment of apredetermined weight to each element of the data array.

The present invention of claim 7 is an entertainment apparatus accordingto any one of claims 2 to 6. The card identification means includes athreshold value determination means for determining whether or not thesum total of differentials is larger than a predetermined thresholdvalue, and excludes any entry with the sum total of differentials largerthan the predetermined threshold value from identification candidates.

The present invention of claim 8 is an entertainment apparatus accordingto claim 7. The card identification means includes anumber-of-candidates determination means for determining a total numberof candidates which are left as a result of determination made by thethreshold value determination means. When the number-of-candidatesdetermination means determines that the number of candidates is “0”, thecard identification means does not obtain any card ID. When thenumber-of-candidates determination means determines that the number ofcandidates is “1”, the card identification means obtains the card ID ofthe identification candidate.

The present invention of claim 9 is an entertainment apparatus accordingto claim 8, taking the database as a first database and furthercomprising a second database including one or more entries. Each of theentries includes a plurality of candidate card IDs and one determinationcard ID. The card identification means includes a number-of-candidatesdetermination means for determining whether two or more identificationcandidates are left or not. When the number-of-candidates determinationmeans determines that the number of candidates is “2 or more”, the cardidentification means searches the second database for an entry in whichthere is a match between a combination of card IDs of the leftcandidates and a combination of the candidate card IDs in said seconddatabase. If there exists any matching entry, the card identificationmeans obtains the determination card ID of the entry.

The present invention of claim 10 is an entertainment apparatusaccording to any one of claims 1 to 9. The database includes card datacorresponding to each entry. The information processing means includes acard data display means for displaying at least the design based on thecard data of the entry corresponding to the card ID obtained by the cardidentification means.

The present invention of claim 11 is an entertainment apparatusaccording to any one of claims 1 to 10, further comprising a cartridgeconnector. The cartridge connector is equipped with a memory cartridgeand the memory cartridge stores another database.

The present invention of claim 12 is an entertainment apparatus whichobtains inputs from a plurality of cards on each of which a visuallyhuman-identifiable design is printed, and performs informationprocessing according to the inputs. The entertainment apparatus usingcards comprises a photographing means for photographing the design ofthe card to fetch a photographic pixel data array; a card identificationmeans for obtaining a data string corresponding to the design from thephotographic pixel data array; and an information processing means forperforming the information processing with the data string obtained bythe card identification means as an input.

The present invention of claim 13 is an entertainment apparatusaccording to any one of claims 1 to 12, further comprising a cardphotographing part for setting a card in a predetermined position and alight source for irradiating light to a surface to be photographed ofthe card set in the card photographing part.

The present invention of claim 14 is an entertainment apparatusaccording to claim 12, further comprising a reflection means fordiffusely reflecting light from the light source and letting the lightenter the surface to be photographed.

The present invention of claim 15 is an entertainment apparatusaccording to claim 13 or 14, further comprising a photographing partcover for covering the card photographing part, the cover having aposition correction mark on a surface opposite to the photographingmeans; and a photographic pixel data fetching area correction means forcorrecting a fetching area of photographic pixel data based on theposition correction mark. The photographing means photographs theposition correction mark under a state where no card is set in the cardphotographing part.

Claim 16 is a method of identifying a card by photographing a pluralityof cards on each of which a visually human-identifiable design isprinted. The card identifying method includes steps of: (a) preparing adatabase including a plurality of entries individually corresponding tothe plurality of cards, each of the entries including a pair of card IDand comparison data array; (b) photographing the design by an imagesensor and obtaining a photographic signal; (c) sampling thephotographic signal at a first resolution and forming a data array; (d)re-sampling the data array at a second resolution which is lower thanthe first resolution and forming a photographic pixel data array; and(e) searching the database for a specific comparison data array based onthe photographic pixel data array and obtaining the card ID pairing upwith the specific comparison data array.

Claim 17 is a card identifying method according to claim 16. In the step(e), a distance between the photographic pixel data array and thecomparison data array is calculated, and the card ID of the entry withthe comparison data array at the shortest distance is obtained.

In the present invention of claim 1, a plurality of cards (30: areference numeral for a corresponding element or component in theembodiments. The same can be said for the following ones.) are employed.Each of the cards includes a design printed in such a manner as to bevisually human-identifiable. The entertainment apparatus photographs thedesign of a card so as to identify which is that card, and performsinformation processing by use of a processor (64), for example, takingthe card ID of the identified card as an input. More specifically, thephotographing means (64, S139, S147, S149) includes an image sensor (54)and fetches a photographic pixel data array from an photographic signalfrom the image sensor. On the other hand, the database (67A) is providedwith a pair of card ID and comparison data array for each of a pluralityof entries individually corresponding to the plurality of cards. Thecard identification means (64, S151) searches such a database for aspecific comparison data array based on the photographic pixel dataarray, and outputs a card ID paring up with the specific comparison dataarray. Then, the information processing means such as the processor (64)performs information processing e.g., computer game processing, takingas an input the card ID obtained in such a way.

According to claim 2, the photographing means includes the image sensor(54) for photographing a design and outputting a photographic signal.The photographic signal is supplied to the data array forming means(S77). The data array forming means samples the photographic signal at afirst resolution and forms a data array. In the embodiments, thephotographic pixel data array forming means (S147) re-samples the dataarray of the first resolution at a second resolution which is lower thanthe first one and forms a photographic pixel data array. If required,however, the photographic pixel data array may be formed by carrying outa direct current component elimination and normalization process.

In the present invention of claim 2, the photographic pixel data arrayis formed through re-sampling at the second resolution, which makes itpossible to reduce a load of processing for identification and a size ofdatabase while assuring a required accuracy of identification.

In the present invention of claim 3, the card identification meanscalculates a distance between the photographic pixel data array and thecomparison data array, and obtains the card ID of the entry with thecomparison data array at the shortest distance.

In the present invention of claim 4, the distance is a sum total ofabsolute values of differentials between elements of the photographicpixel data array and elements of the comparison data array correspondingthereto.

In the present invention of claim 5, the distance is a sum total ofsquares of the differentials between the elements of the photographicpixel data array and the elements of the comparison data arraycorresponding thereto.

According to claims 3 to 5, card identification can be easily performedwith reference to the database.

In claim 6, the photographic pixel data array forming means forms thephotographic pixel data array by assigning a predetermined weight toeach element of the data array with the use of a two-dimensional windowfunction (FIG. 26), for example.

According to claim 6, it is possible to obtain a re-sampled pixel valuethat reflects pixels near a center more highly by increasing the weightof pixels near the center and decreasing the weight of pixels distantfrom the center at a time of re-sampling.

In claim 7, when the threshold determination means (S183) determinesthat the sum total of differentials in some entry is larger than apredetermined threshold value, the entry is excluded from identificationcandidates (S189).

In claim 8, when the first number-of-candidates determination means(S193) determines that the number of candidate is “0”, a status is “Nocard is matching” and no card ID is obtained (S195). Also, when thesecond number-of-candidates determination means (S197) determines thatthe number of candidate is “1”, the card ID for that identificationcandidate is obtained (S199).

In claim 9, the second database (67B) is further provided. When thenumber-of-candidates determination means (S197) determines that thenumber of candidates to be “2 or more”, the second database is searchedfor an entry in which there is a match between a combination of card IDsfor the remaining candidates and a combination of candidate card IDs ina step S217, for example. If there exists any matching entry, thedetermination card ID of the entry is obtained.

According to the specific technique of identification in claims 5 to 9,it is possible to identify one card in a secure manner.

In claim 10, the card data display means (S127, 100) displays a designand other required card information according to the card data read fromthe database (67A).

According to claim 10, it is possible to see how the card provided by aplayer has been identified or recognized. This offers the player thereliability of the entertainment apparatus.

In claim 11, when inserted into the cartridge connector (68), the memorycartridge (34) is linked with the processor through the cartridgeconnector. Therefore, the employment of the memory cartridge makes itpossible to add, update and change a database. In addition, using thememory cartridge also allows the addition, update and change ofsoftware.

The present invention of claim 12 utilizes a plurality of cards (30).Each of the cards includes a design printed in such a manner as to bevisually human-identifiable. The entertainment apparatus includes aphotographing means. The photographing means (64, S139, S147, S149)includes an image sensor (54), and fetches a photographic pixel dataarray out of a photographic signal from this image sensor. The cardidentification means obtains a data string by processing thisphotographic pixel data array. Such an information processing means likea processor (64) performs information processing, taking as an input thedata string obtained in such a way.

In claim 13, a surface to be photographed of a card set in the cardphotographing part (28) is irradiated with light from a light source,i.e., an LED (58).

As described in claim 14, using the reflection means (60) makes itpossible to evenly irradiate the surface to be photographed of the card.

In claim 15, the card photographing part cover (26) is provided with aposition correction mark (62) on a surface opposite to the photographingmeans, i.e., a back side (27). The photographing means photographs theposition correction mark in a state where no card is set in the cardphotographing part, which allows the photographic pixel data fetchingarea correction means (S21, S23) to correct an photographic pixel datafetching area.

According to claim 15, it is possible to photograph the design of a cardin a secure manner even if there occurs a position error in the imagesensor, etc.

In claim 16, the photographic signal obtained from the designphotographed by the image sensor, is sampled at a first resolution toform a data array. The data array is re-sampled at a second resolutionwhich is lower than the first resolution to form a photographic pixeldata array. Then, the database is searched for a specific comparisondata array based on the photographic pixel data array, and the card IDpairing up with the specific comparison data array is obtained.

In claim 17, in the card identification step (S151, S181), a distancebetween the photographic pixel data array and the comparison data array(for example, Euclid distance, Hamming distance, etc.) is calculated,and the card ID of the entry in the comparison data array at theshortest distance is acquired.

According to the present invention, a card can be identified if only adesign is printed on it. Thus, this makes it possible to enjoy such anentertainment as a card game, using even a card with no identificationcode that has become already distributed on the market.

The above described objects and other objects, features, aspects andadvantages of the present invention will become more apparent from thefollowing detailed description of the present invention when taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustrative view showing an overall structure of a cardgame system of one embodiment of the present invention;

FIG. 2 is an illustrative view showing one example of a card used inFIG. 1 embodiment;

FIG. 3 is an illustrative view of a card game machine of FIG. 1embodiment as seen from above;

FIG. 4 is a sectional view of the card game machine of FIG. 1 embodimentas seen from a line III-III in FIG. 2;

FIG. 5 is an illustrative view showing a back side of a cardphotographing part cover of the card game machine of FIG. 1 embodiment;

FIG. 6 is a block diagram showing FIG. 1 embodiment;

FIG. 7 is an illustrative view showing one example of a database A;

FIG. 8 is an illustrative view showing one example of a database B;

FIG. 9 is a circuit diagram showing a structure for fetching pixel datafrom an image sensor into a game processor, and an LED driving circuitin FIG. 6 embodiment;

FIG. 10 is a timing diagram showing an operation of FIG. 9 embodiment;

FIG. 11 is a timing diagram showing one enlarged part of FIG. 10;

FIG. 12 is a flowchart showing an overall operation of FIG. 1embodiment;

FIG. 13 is a flowchart showing a system initialization operation of FIG.12 embodiment;

FIG. 14 is a flowchart showing a sensor initialization operation in thesystem initialization process of FIG. 13 embodiment;

FIG. 15 is a flowchart showing a command transmitting processingoperation of FIG. 14;

FIG. 16 is a flowchart showing a register setup processing operation ofFIG. 14;

FIG. 17 is a timing diagram showing the register setup processingoperation described in FIG. 16;

FIG. 18 is a flowchart showing a photographing operation in the systeminitialization process of FIG. 13 embodiment;

FIG. 19 is a flowchart showing a pixel data array acquisition processingoperation in the photographing operation of FIG. 18 embodiment;

FIG. 20 is a flowchart showing a pixel data acquisition processingoperation in the pixel data array acquisition processing operation ofFIG. 19;

FIG. 21 is an illustrative view showing an image of a mark on the backside of a photographing part cover photographed by the photographingoperation of FIG. 20;

FIG. 22 is an illustrative view showing acquisition of a midpoint fromthe mark and establishment of an effective pixel area around themidpoint;

FIG. 23 is a flowchart showing a game play operation in FIG. 12embodiment;

FIG. 24 is a flowchart showing a card photographing and identifyingoperation in FIG. 23 embodiment;

FIG. 25 is a flowchart showing a re-sampling operation in FIG. 24embodiment;

FIG. 26 is an illustrative view showing a sampling method in FIG. 25embodiment;

FIG. 27 is a flowchart showing a direct current component eliminationand normalization operation in FIG. 24 embodiment;

FIG. 28 is a flowchart showing a database search operation in FIG. 24embodiment;

FIG. 29 is a flowchart showing rest of the database search operation;

FIG. 30 is an illustrative view showing an example of a card displayscreen displayed on a television monitor in FIG. 1 embodiment; and

FIG. 31 is an illustrative view showing an example of a game screendisplayed on the television monitor in FIG. 1 embodiment.

BEST MODE FOR PRACTICING THE INVENTION

Referring to FIG. 1, a card game system 10 of one embodiment of thepresent invention includes a card game machine (hereinafter sometimesreferred to simply as “game machine”) 12 and a television monitor 14such as a home television receiver set. The game machine 12 is connectedto an AV terminal 16 of the television monitor 14 through an AV cable18. Also, the game machine 12 is supplied with a direct-current power byan AC adapter 20 which may, however, be replaced with a battery 22.

The game machine 12 also includes a housing 24. A top surface of thehousing 24 is formed in a step-wise manner and has an upper step and alower step. Provided on a top surface of the upper step of the housing24 is a card photographing part cover 26. A clearance is created betweena bottom surface of the cover 26 and the top surface of the housing 24,which constitutes a card insertion part 28. More specifically, a card 30as specifically shown in FIG. 2 is inserted into the card insertion part28, and a design display part 31 of the card 30 (FIG. 2) is photographedin a manner described later.

A cartridge insertion slot 32 is formed on the top surface of the upperstep of the housing 24 at a back of the cover 26. A cartridge 34 isinserted into the cartridge insertion slot 32. As described later, thecartridge 34 is electrically joined with a game processor via aconnector. A power switch 36 and a reset switch 38 are provided ateither end of the cover 26 on the upper step of the housing 24.

A direction key 40 and a decision and card photographing key 42 areprovided at either end of the top surface of the lower step of thehousing 24A. The direction key 40 has individual buttons for fourdirections (up, down, left and right), and is used to move a cursor forselection of a menu or a game mode. The decision and card photographingkey 40 is employed to confirm input to the game machine 12 and ispressed to photograph a card inserted into the card insertion slot 26. Acancel key 44 and a pause key 46 are provided on the top surface of thelower step of the housing 24 between the two buttons 40 and 42. Thecancel key 44 is used to cancel the input to the game machine 12. Thepause key 46 is utilized to stop the operation temporarily.

FIG. 3 and FIG. 4 illustrate in more detail the card game machine 12 ofFIG. 1 embodiment. More specifically, the game machine 12 has thehousing 24 as mentioned above. The housing 24 consists of an upperhousing 24 a and a lower housing 24 b both of which are formed byplastic injection molding. The upper and lower housings 24 a and 24 bare coupled to each other by a boss 48 for joining upper and lowerhousings to constitute a single housing 24. The upper housing 24 a isprovided with a board boss 50 in such a manner as to hang from a ceilingthereof. A printed circuit board 52 is screwed to an end (lower end) ofthe board boss 50. Attached on the printed circuit board 52 are an imagesensor 54, its related components, and electronic parts such as a gameprocessor 64 (FIG. 6) described later so as to constitute a requiredcircuit.

The image sensor 54, although not illustrated in detail, includes a unitbase and a support cylinder supported by the unit base, both of whichare formed by plastic injection molding, for example. As can be seenwell from FIG. 4, formed on an upper surface of the support cylinder isa trumpet-shaped opening whose inside is in a shape of an invertedcircular cone. Also, provided inside a cylindrical part below theopening is an optical system including a concave lens and a convex lensboth of which are formed by transparent plastic molding, for example. Animaging element is fixed below the convex lens. This allows the imagesensor 54 to photograph an image corresponding to incident light througha lens system from the upper opening of the support cylinder. For a morespecific structure, refer to FIG. 2 of copending Japanese PatentApplication No. 2002-346052 relating to the invention of the sameinventor. It is noted that a low-resolution CMOS image sensor (e.g.32×32 pixels: gray scale) is used as the image sensor 54 in thisembodiment. However, pixels of the photographing element of the imagesensor 54 may be more increased in number and another imaging elementsuch as a CCD may be employed.

A transparent resin board 56 is fitted into the ceiling of the upperhousing 24 a and also below the cover 26, and the card 30 (FIG. 2)inserted through the card insertion part 28 (FIG. 3) is placed on theresin board. A design 31 of the card 30 is supposed to be photographedby the image sensor 54, but photographing by the image sensor 54 couldnot be successfully performed as it is because the card 30 is surroundedby the components and thus is under considerably dark conditions. Inthis embodiment, therefore, a plurality (four in this embodiment) of redlight emitting diodes (hereinafter sometimes called as “LED”) 58 areprovided within the upper housing 24 a so that light from the LED 58 isreflected within the housing 24 and is irradiated onto the surface to bephotographed of the card 30 through the transparent resin board 56. Inorder for the reflection of the light to take place more efficiently, alight reflector 60 is provided above the printed circuit board 52. Thelight reflector 60 in this embodiment is a white resin board whosesurface is mat-finished. Mat finish is an idea for illuminating theentire surface to be photographed as evenly as possible by diffuselyreflecting the light from the LED 58. Alternatively, another surfaceroughening process may be employed. In addition, the reflector 60 may bemade of a material other than plastic, such as paper.

Incidentally, a red LED is used in this embodiment. However, an LED ofdifferent color or a light source other than LED may be utilized.Moreover, if color photography is required, a white light source shouldbe used as a light source to that effect.

It is noted that an inside surface 27 (FIG. 5) of the photographing partcover 26 is also molded of white plastic (or paper) so that lightreflection can be done in an efficient way. Therefore, the surface to bephotographed of the card 30 is also illuminated by the light reflectedfrom the inside surface 27 of the cover 26. Additionally, formed on theinside surface 27 of the cover 26 are a plurality (four in thisembodiment) of black marks 62. These four marks 62 are intended todetect a position error of the image sensor 54 or other components(resulting from a deviation in attachment position and variations incomponent dimensions) and correct or calibrate the position error. Inshort, a center of an area surrounded by the four black marks 62 isfound and a certain number of pixels covering the center are defined asan effective photographing area. Therefore, even if there are anyvariations in attachment position or dimensions of the image sensor 54,etc. among individual game machines, an effective photographing area isdefined for each game machine and thus it is possible to photograph thedesign 31 (FIG. 2) of the card 30 in a secure manner.

Referring to FIG. 6, the design 31 printed on the card 30 is irradiatedwith the light from the red light emitting diode 58 and is photographedby the image sensor 54. Thus, an image signal of the card design isoutput from the image sensor 54. The analog image signal from the imagesensor 54 is converted into digital data by an A/D converter (not shown)included in a game processor 64.

Although arbitrary kinds of processor can be utilized as such the gameprocessor 64, a high-speed processor developed by the applicant of thepresent invention and already filed as a patent application is used inthis embodiment. This high-speed processor is disclosed in detail inJapanese Patent Laying-open No. H10-307790 [G06F13/36, 15/78] and U.S.Pat. No. 6,070,205 corresponding thereto.

Although not illustrated, the game processor 64 includes variousprocessors such as a CPU, a graphics processor, a sound processor, a DMAprocessor, etc. and also includes the above-described A/D converter usedfor fetching an analog signal, and an input/output control circuit forreceiving an input signal such as a key operation signal and an infraredsignal, and giving an output signal to external equipment. Therefore, aninput signal from the operation keys 42 to 46 is applied to the CPUthrough the input/output control circuit. The CPU executes a requiredoperation according to the input signal, and applies the result to thegraphics processor, the sound processor, etc. Therefore, the graphicprocessor and the sound processor execute an image processing and asound processing according to the operation result.

Although not illustrated, the processor 64 is provided with an internalmemory, and the internal memory includes a ROM or a RAM (SRAM and/orDRAM). The RAM is utilized as a temporary memory, a working memory, acounter, or a register area (temporary data area), and a flag area. Itis noted that the processor 64 is connected with a ROM 66 via anexternal bus. In the ROM 66, a game program described later and a cardidentification database are set in advance.

The game processor 64 processes a digital image signal input from theimage sensor 54 via the A/D converter to identify which card iscurrently located in the card photographing part, and executes anarithmetic operation, a graphic processing, a sound processing, etc.according to an input signal from the operation keys 40 to 46 to outputa video signal and an audio signal. The video signal is an image signalfor displaying a game screen, and the audio signal is a signal for agame music and a sound effect. Accordingly, a game screen is displayedon the screen of a television monitor (not shown), and a necessary sound(sound effect, game music) is output from its speaker.

The card game machine 12 of this embodiment further has a cartridgeconnector 68 connected to an external bus. The cartridge connector 68 isprovided at a back of the cartridge insertion slot 32 shown in FIG. 1.The cartridge connector 68 is connected with the cartridge 34 asrequired. The cartridge 34 contains an external ROM 70. As an example,the ROM 70 stores an identification database so as to, when the kind ofcard to be identified has been changed, accommodate cards of the newkind. In this case, therefore, the cartridge 34 is used together withthe internal ROM 66.

However, as done in the case of copending Japanese Patent ApplicationNo. 2002-132509 related to the application of the same applicant, thecartridge 34 may also be used to start another program. In this case,the ROM 70 needs to be preconfigured with the program as well as thecard identification database.

More specifically, in one embodiment, the ROM 70 in the memory cartridge34 stores data for addition, update or exchange of data in a databasedescribed later. On the contrary, in another embodiment where adifferent program is started, the ROM 70 needs to store some data andprograms for addition, update or exchange of software besides the abovementioned database data.

One example of identification database is shown in FIG. 7 and FIG. 8. Anidentification database 67A of FIG. 7 stores a comparison pixel valuefor each pixel (re-sampled pixel) after an effective area (24×24=576pixels in this embodiment) has been re-sampled (to be described later)by 3×3 pixels, and compares it with a pixel value (re-sampled pixelvalue) for each pixel after a photographic signal at that time has beenprocessed and re-sampled. Also, strictly speaking, it is somewhatinappropriate to use the term “pixel” in the context after a re-samplingprocess because there exist nine pixels originally. However, the term“re-sampled pixel” is here used for convenience's sake in the meaningthat “the original nine pixels have been re-sampled into one”.) If there-sampled pixel value obtained from the photographic data of the cardat that time matches the comparison pixel value stored in the database67A, the card can be identified as a card of “entry #2”, for example.

As shown in FIG. 7, the database 67A is preconfigured with card data(design, name, characteristics, power value, etc.) of a card for eachentry, which is represented by a card ID to be specified by its entry.As explained later, when a card is specified during the game play, acard screen 100 (FIG. 3) is displayed by use of the card data.

The database 67A of FIG. 7 is a database for identifying one card by acomparison of re-sampled pixel values. If the pixel value of eachre-sampled pixel matches a reference value of the database 67A, it ispossible to determine that the card photographed at that time is a cardindicated by any one of the entries. However, a match do not alwaysoccurs in all the re-sampled pixel values. Identification of the cardbecomes impossible if there exist differences in pixel values of somere-sampled pixels. This would not allow the card game to proceed, and itis thus necessary to identify the card even if there is no match. Anidentification database 67B of FIG. 8 is a database to be used in such acase. More specifically, if one card cannot be identified and aplurality of candidates for it remains to the last, the database 67B ofFIG. 8 is used in order to identify the card from the candidates.

The database 67B of FIG. 8 stores entry numbers (#) identified by usingthe database of FIG. 7, as identification card IDs. For example, ifthere are two finally remaining candidates recognized as a #22 card anda #4 card, the card in question is identified as the #4 card. Morespecifically, the database 67B of FIG. 8 stores sequential recognitionresults as candidate patterns, and lastly identifies one card with amatching candidate pattern in the recognized sequence.

It is noted that the databases 67A and 67B shown in FIG. 7 and FIG. 8are supposed to be stored in the internal ROM 66 (FIG. 6). However, ifthe cartridge 34 is employed, it is naturally possible to establishsimilar databases in the external ROM 70 as well.

Here, with referring to FIG. 9 to FIG. 11, a configuration for fetchingpixel data to the game processor 64 from the COMS image sensor 54 isdescribed in detail. As shown in FIG. 9, the CMOS image sensor 54 inthis embodiment is a type of outputting a pixel signal as an analogsignal, and therefore, the pixel signal is input to an analog input portof the game processor 64. The analog input port is connected to an A/Dconverter (not shown) within the game processor 64, and thus, the gameprocessor 64 obtains or fetches from the A/D converter the pixel signal(pixel data) that has been converted to digital data.

A midpoint of the above-described analog pixel signal is determined by areference voltage applied to a reference voltage terminal Vref of theCMOS image sensor 54. Therefore, in this embodiment, as to the imagesensor 54, a reference voltage generating circuit 72 including aresistor voltage-dividing circuit, for example, is provided, and fromthe reference voltage generating circuit 72, a reference voltage havinga constant magnitude is always applied to the reference voltage terminalVref.

Each of digital signals for controlling the CMOS image sensor 54 isapplied to the I/O port of the game processor 64, or output therefrom.The I/O ports are digital ports capable of controlling respectiveinput/outputs, and connected to an input/output control circuit (notshown) within the game processor 64.

More specifically, from the output port of the game processor 64, areset signal for resetting the image sensor 54 is output so as to beapplied to the image sensor 54. Furthermore, from the image sensor 54, apixel data strobe signal and a frame status flag signal are output, andthese signals are applied to the input port of the game processor 64.The pixel data strobe signal is a strobe signal as shown in FIG. 10( b)for reading each of the pixel signals described above. The frame statusflag signal is a flag signal for showing a state of the image sensor 54,and defines an exposure period of the image sensor 54 as shown in FIG.10( a). A low level of the frame status signal shown in FIG. 10( a)indicates an exposure period, and a high level thereof shown in FIG. 10(a) indicates a non-exposure period.

Furthermore, the game processor 64 outputs from the I/O port a command(or command+data) set in a control register (not shown) within the CMOSimage sensor 54 as register data, and outputs a register setting clockin which the high level and the low level are repeated and applies it tothe image sensor 54.

It is noted that as the infrared-LED 58, four (4) infrared-LEDs 58, 58,. . . connected in parallel with each other are utilized as shown inFIG. 9. These four (4) infrared-LEDs 58 are arranged such that theyirradiate the object (the card 30 to be photographed) as describedabove, and surround the image sensor 54. The LED 58 is turned on and isextinguished (turned off) by the LED driving circuit 74. The LED drivingcircuit 74 receives the above-described frame status flag signal fromthe image sensor 54, and the flag signal is applied to a base of a PNPtransistor 84 through a differentiation circuit 76 consisting of aresistor 78 and a capacitor 80. The PNP transistor 84 is connected witha pull-up resistor 82, and the base of the PNP transistor 84 is normallypulled up to a high level. Then, when the frame status signal becomes alow level, the low level is input to the base through thedifferentiation circuit 76, and the PNP transistor 84 is turned on onlyduring a low level period of the flag signal.

An emitter of the PNP transistor 84 is grounded via resistors 86 and 88.Then, a node of emitter resistances 86 and 88 is connected to the baseof an NPN transistor 90. A collector of the NPN transistor 90 iscommonly connected to anodes of the respective infrared-LEDs 58. Anemitter of the NPN transistor 90 is directly connected to a base ofanother NPN transistor 92. A collector of the NPN transistor 92 iscommonly connected to cathodes of the respective LEDs 58, and theemitter thereof is grounded.

In the LED driving circuit 74, the LED 58 is turned on during only aperiod when the LED control signal (corresponding to a second signal)output from the I/O port of the game processor 64 is active (highlevel), and the frame status flag signal from the image sensor 54 is alow level. As shown in FIG. 10( a), when the frame status flag signalbecomes the low level, the PNP transistor 84 is turned on during the lowlevel period (although there is a delay due to the time constant of thedifferentiation circuit 76 in reality). Accordingly, when the LEDcontrol signal shown in FIG. 10( d) is output from the game processor 64at the high level, the base of the NPN transistor 90 becomes a lowlevel, and then, the transistor 90 is turned off. When the transistor 90is turned off, the transistor 92 is turned on. Accordingly, a currentflows a power supply (shown by a small white circle in FIG. 9) throughthe respective LEDs 58 and the transistor 92, and in response thereto,the respective LEDs 58 are turned on as shown in FIG. 10( e).

In the LED driving circuit 74 of this embodiment, the LED 58 is turnedon only when the LED control signal shown in FIG. 10( d) is active andthe frame status flag signal is low level, that is, only during anexposure period (see FIG. 10( f)) of the image sensor 54. Therefore,according to this embodiment, it is possible to reduce useless powerconsumption. Furthermore, the frame status flag signal is coupled by thecapacitor 80, and therefore, on assumption that the flag signal issuspended with the low level kept due to a hang-up of the image sensor54 and the like, the transistor 84 is surely turned off after a lapse ofa predetermined time period, and the LED 58 is surely turned off after alapse of the predetermined time period.

Thus, in this embodiment, it is possible to set or change the exposuretime period of the image sensor 54 arbitrarily and freely by changingduration of the frame status signal.

In addition, by changing the duration or period of the frame statussignal and the LED control signal, it is possible to arbitrarily andfreely set or change a light-emission period, a non light-emissionperiod, a duty cycle of light-emission/non light-emission, etc. of theLED 58, that is, the stroboscope.

As described previously, when the surface to be photographed of the card30, i.e., the design 31 (FIG. 2) is irradiated by an infrared light fromthe LED 58, the image sensor 54 is exposed by the reflected light fromit. In response thereto, the pixel signal described above is output fromthe image sensor 54. More specifically, the CMOS image sensor 54 outputsan analog pixel signal shown in FIG. 10( c) in synchronous with a pixeldata strobe shown in FIG. 10( b) during a period when the frame statussignal shown in the above-described FIG. 10( a) is the high level (aperiod when the LED 58 is not turned on). The game processor 64, whilemonitoring the frame status flag signal and the pixel data strobe,obtains a digital pixel data through the A/D converter.

It is noted that the pixel data (pixel signal) is output in an order oflines such as the zero line, the first line, . . . to the thirty-firstline as shown in FIG. 11( c). It is noted that single pixel data at thehead of each of lines becomes dummy data.

Incidentally, in the above mentioned embodiment, the LED 58 is turned onto irradiate the card 30 only when needed. Alternatively, the LED 58 maystay illuminated while a power switch 36 (FIG. 1) is on.

Next, a description will be given as to functioning or operation of thecard game system 10 of the FIG. 1 embodiment, based on the flowcharts inFIG. 12 and later. A game is started by turning the power switch 36shown in FIG. 1 on. It is noted that the game processor 64 shown in FIG.6 executes an initialization process in a step S1. A systeminitialization routine is presented in FIG. 13. In a first step S11 ofFIG. 13, a system (hardware) and memory (respective variables) areinitialized.

Next, in a step S13, a sensor initialization process is performed. Thesensor initialization process includes a data setting process for acontrol register within the image sensor 54, and more specifically, isperformed in accordance with the flowcharts shown in FIG. 14 to FIG. 16and the timing shown in FIG. 17.

In a first step S27 shown in FIG. 14, the game processor 64 sets acommand “CONF” as setting data. It is noted that the command “CONF” is acommand for informing the image sensor 54 of entering the setting modefor transmitting a command from the game processor 64. Then, in afollowing step S29, a command transmitting process is executed shown indetail in FIG. 15.

In a first step S47 of the command transmitting process, the processor64 sets the setting data (command “CONF” for the step S29) to theregister data (I/O port), and sets a register setting clock (I/O port)to a low level in a next step S49. Then, after a wait of a predeterminedtime period in a step S51, the register setting clock is set to a highlevel in a step S53. Then, after a wait of a predetermined time periodin a step S55, the register setting clock is set to the low level onceagain in a step S57. Thus, as shown in FIG. 17, by performing the waitof the predetermined time period, the register setting clock is changedto the low level, the high level, and the low level one after another,and whereby, a transmitting process of the command (command orcommand+data) is performed.

Returning to FIG. 14, in a step S31, a pixel mode is set, and anexposure time period is set. In the case of this embodiment, the imagesensor 54 is, as described above, a CMOS sensor of 32×32, for example,and therefore, “0h” indicative of being 32×32 pixels is set to the pixelmode register of the setting address “0”. In a next step S33, the gameprocessor 64 executes a register setting process shown in FIG. 16 indetail.

In a first step S59 of the register setting process, the processor 64sets a command “MOV”+address as a setting data, and, in a following stepS61, executes a command transmitting process described above in FIG. 15to transmit it. The processor 64 sets the command “LD”+data as thesetting data in a succeeding step S63, and executes a commandtransmitting process to transmit it in a following step S65. Theprocessor 64 sets a command “SET” as the setting data in a step S67 totransmit it in a following step S69. It is noted that the command “MOV”is a command indicative of transmitting an address of the controlregister, the command “LD” is a command indicative of transmitting data,and the command “SET” is a command for actually setting data to itsaddress. It is noted that the process is repeated in a case that thereare a plurality of control registers to be set.

Returning again to FIG. 14, in a next step S35, the setting address isrendered “1” (indicative of low-Nibble address of an exposure timesetting register), and low-Nibble data “Fh” of “FFh” indicative of amaximum exposure time period is set as data to be set. Then, in a stepS37, the register setting process in FIG. 16 is executed. Similarly, ina step S39, the setting address is rendered “2” (indicative ofhigh-Nibble address of an exposure time setting register), andhigh-Nibble data “Fh” of “FFh” indicative of the maximum exposure timeperiod is set as data to be set, and the register setting process isexecuted in a step S41.

Then, in a step S43, a command “RUN” indicative of an end of the settingand for starting to output data from the image sensor 54 is set so as tobe transmitted in a step S45. Thus, the sensor initialization process isexecuted in the step S13 shown in FIG. 13.

In a next step S15 of FIG. 13, a photographing routine is performed asshown in detail in FIG. 18. Referring to FIG. 18, “0” is set to allelements of a temporary data array (in a storage area of 32×32=1024pixels) formed in an internal RAM (not illustrated) of the processor 64in a first step S71. That is, the temporary data array is initialized.After that, the image sensor 54 is reset in a step S73 and the LEDs 58are turned on in a step S75. Then, a picture element (pixel) data arrayfetching process is carried out in a next step S77.

The pixel data array fetching process routine is specifically describedin FIG. 19. In a first step S78 in FIG. 19, the game processor 64 sets“−1” to X and sets “0” to Y as an element number of the image dataarray. The pixel data array in this embodiment is two-dimensional arrayof X=0−31, and Y=0−31. However, the dummy data is output as data of ahead pixel in each line as described above, so that “−1” is set as aninitial value of X. In a succeeding step S80, a pixel data fetchingprocess of the elements [Y] and [X] shown in FIG. 20 is executed.

In a first step S93 shown in FIG. 20, the game processor 64 checks aframe status flag signal from the image sensor 54, and in a step S95, itis determined whether or not its rising edge (from the low level to thehigh level) occurs. Then, when it is detected that the flag signal risesin the step S95, the game processor 64 instructs the A/D converterinside thereof to start to convert an input analog pixel signal todigital data in a succeeding step S97. Then, in a step S99, it isdetermined whether or not the pixel strobe from the image sensor 54 ispresent, and in a step S101, it is determined whether or not its risingedge from the low level to the high level occurs.

If “YES” is determined in the step S101, the game processor 64 thendetermines whether X=−1 or not, that is, whether the head pixel or notin a step S103. As described above, the head pixel in each line is setas a dummy pixel, so that if “YES” is determined in the step S103,without fetching the pixel data at that time in a next step S105, theelement number X is incremented in a step S107.

If “NO” is determined in the step S103, the second pixel data onward inthe line is determined, and therefore, the pixel data at that time isfetched in steps S109 and S111 so as to be stored in a temporaryregister (not shown). Thereafter, the process returns to a step S82shown in FIG. 19.

In the step S82, the pixel data stored in the temporary register isstored as the elements [Y] [X] of the pixel data array.

In a following step S84, the X is incremented. If it is determined in astep S86 that X is less than “32”, the process from the step S80 to thestep S84 described above is repeatedly executed. If it is determined inthe step S86 that X has reached “32”, that is, if the fetch of the pixeldata has reached the end of the line, “−1” is set to the X in afollowing step S88 and the Y” is incremented in a step S90. If it hasbeen determined in a step S92 whether Y is less than “32”, the processreturns to the step S80 to repeat the pixel data fetching process fromthe head pixel of the next line. If it is determined in the step S92that Y has reached “32”, that is, if the fetch of the pixel dataobtainment has reached the end of the pixel data array, the processreturns to a step S79 of FIG. 18.

The LEDs 58 are turned off in the step S79 of FIG. 18. After that, in astep S81, each element of the obtained pixel data is added to eachelement of the temporary data array. This process is a step to beexecuted so as to read even low-contrast photographic data in a securemanner, and a pixel value is added to each element (each pixel) of thetemporary data array. Then, in a step S83, by determining a sum total ofpixel values of all the elements of the temporary data array(32×32=1024) and then dividing the sum total by the number of elements(1024 in this embodiment), an average pixel value of all elements of thetemporary data array is calculated and a minimum pixel value is detectedfrom all the elements.

In a succeeding step S85, it is determined whether or not “the averagevalue−the minimum value” is larger than a predetermined threshold value.That is, it is determined whether or not a contrast has reached thepredetermined threshold value or more. The threshold value here is acontrast (the average pixel value−the minimum pixel value) on a premisethat image processing can be done without fault from that time onward.If “NO” has been determined in the step S85, that is, if the requiredminimum contrast has not been reached, a counter is incremented in astep S87 so as to repeat the steps S81 and S83, and then it isdetermined in a step S89 whether or not a count value of the counter hasbecome larger than a predetermined value (32 times or 64 times in thisembodiment). If “YES” is determined in the step S89, the contrast is notsufficient but a next step S91 is performed as in the case where “YES”is determined in the previous step S85 because the number of readingtimes of pixel data would become large and that would be tootime-consuming. In this step S91, a minimum value is subtracted fromeach element of the temporary data array, and after the subtraction,some element(s) exceeding a predetermined maximum (pixel) value aresaturated to the maximum value. More specifically, the values of all theelements are larger than the minimum value, and under these conditions,a dynamic range would be reduced due to a bias unnecessary for a directcurrent component. Thus, the process of subtracting the minimum value isperformed. Then, a pixel value between the minimum value and the maximumvalue after the subtraction of the minimum value, is employed as it is.In this manner, the photographing process in the step S15 is carriedout, and the photographic data (pixel value) with the contrast increasedis stored in the temporary data array of the internal RAM (notillustrated).

Then, returning to FIG. 13, the game processor 64 detects the four blackmarks 62 on the back side of the photographing part cover 26 based onthe pixel value in a step S17 of FIG. 13. Then, in a step S19, it isdetermined whether or not all the four marks have been detected as shownin FIG. 21. If “YES” is determined in this step S19, this means that nocard has been inserted into the card insertion slot 28 (FIG. 1 and FIG.3) at that time and that therefore the back side of the cover 26 hasbeen photographed as it is. Also, in this case, a pixel 94 located inthe black mark 62 become blackest as shown in FIG. 22. In a succeedingstep S21, the processor 64 determines a coordinate of a center 96 of arectangular area defined by four pixels 94 shown in FIG. 22. Then, in anext step S23, a square area of 24×24 around the above mentioned centralcoordinate 96 is set as a photographic pixel area, i.e., an effectivearea 98.

As stated above, the effective pixel area 98 of 32×32 pixels to 24×24pixels can be set in the system initialization process. Thus, even ifthere occurs any displacement from a position of the image sensor oranother part due to an assembly error, for example, it is possible tocorrect or calibrate the displacement and to fetch a pixel value fromthe correct position at any time.

Additionally, although this embodiment does not provide for correctionof a displacement related to a rotation direction, it is possible tomake an angle correction as required. Still, in this embodiment, acertain degree of angle deviation can be compensated for by re-samplingthe original 576 (24×24) pixels at a lowered resolution to form 64re-sampled pixels (3×3), as described later.

Also, this embodiment uses the four marks to define the central positionand the effective pixel area of predetermined pixels containing thecentral position. However, a minimum of two marks diagonally opposite toeach other may allow the center and the effective area to be determinedin the same manner.

After the step S1 of FIG. 12, the game processor 64 displays in a stepS2 a game mode selection screen on the television monitor 14 shown inFIG. 1. Then, the game processor 64 waits until some game mode isselected in the step S5. After that, the game play is executed in theselected game mode (in a step S7), and its result is displayed in thenext step S9.

Returning to FIG. 12, a game play routine shown in the step S7 of FIG.12 is described in detail in FIG. 23. In its first step S113, the gameprocessor 64 starts a game process. Then, in a next step S115, a message“Set a card in the photographing part and press the photographing key.”is displayed on the television monitor 14 as shown in FIG. 31, forexample, so as to prompt a game player to insert a card into the cardinsertion slot 28 (FIG. 1). Then, when a press of the decision andphotographing key 42 is detected in a step S117, a card photographingand identification routine is carried out in a next step S119.

The card photographing and identification routine is described in detailin FIG. 24. In a first step S139 of the routine, the game processor 64executes the above described photographing routine shown in FIG. 18.Thus, when the step S139 has been executed, all the elements (576pixels) of the temporary data array store their own pixel values.

Under such conditions as noted above, the game processor 64 determineswhether or not the photographed result matches a state of “No cardexists”. If “No card exists” i.e., “YES” is determined in a step S143,the game processor 64 sets a return value (a result returned from asubroutine to a process of invoking the subroutine) as “No card isplaced” in a succeeding step S145.

If “NO” is determined in the step S143, re-sampling is carried out in anext step S147. The reason for carrying out re-sampling is to minimizethe load on the processor 64 in performing an identification process andthe size of the database 67A while assuring a required accuracy ofidentification. This re-sampling routine is described in detail in FIG.25. As outlined above, in the re-sampling operation, the original 576(24×24) pixels, i.e., P [0] [0] to P [23] [23] are converted into 64re-sampled pixels Q [0] to Q [63]. In that case, a two-dimensionalwindow function shown in FIG. 26 is used. The use of such atwo-dimensional window function makes it possible not only to eliminatealiasing noises but also to absorb or compensate for card displacements.

The two-dimensional window function of this embodiment treats, out ofthe original nine pixels of 3×3, a value for a central pixel with aweight of “4”, treats four pixels near the central one with a weight of“2”, and treats four pixels at the corners most distant from the centralone with a weight of “1”. This aims to place emphasis on the pixels nearthe central by assigning more weights to the pixels closer to thecentral one of the original pixels forming the re-sampled pixels.

For such a re-sampling operation, an initial value “0” is set to anindex counter I (although not illustrated, this is formed in theinternal RAM) in a first step S159 of FIG. 25.

After that, in a step S161, nine pixels corresponding to Q [I] areloaded and stored in their individual local variables of P0 to P8.

Here, P0 denotes the leftmost pixel in the upper row out of the ninepixels shown in FIG. 26. The remaining pixels are allocated in sequencein such a manner that the pixels on the right of the upper leftmost oneare P1 and P2, the leftmost pixel in the middle row is P3, the centralpixel is P4, the pixel on the right of the central one is P5, and thepixels in the lower row are P6, P7 and P8 from left to right.Incidentally, integer division and modulo arithmetic operation are usedin a step S161 because the re-sampled pixels Q [0] to Q [63] need to beloaded into a one-dimensional register, whereas the temporary data arraystores each pixel value in a two-dimensional configuration. In this way,each original pixel value is read out from the memory in the step S161.

In a succeeding step S163, the processor 64 calculates the sum total ofthe original nine pixel values according to assignment of the weights inthe two-dimensional window function described above. More specifically,the pixels P0, P2, P6 and P8 are multiplied by “1”, P1, P3, P5 and P7are multiplied by “2”, P4 is multiplied by “4”, and then the inclusivesum Q of these values are calculated. Then, in a step S165, the sumtotal Q is stored as determination pixel data for Q [I] in there-sampled pixel array (FIG. 26). The steps S161 to S165 are repeatedlyexecuted until the index I is incremented in a next step S167 and “YES”is determined, that is, it is detected that the index I has reached “63”in a step S169. Consequently, the pixel data to be identified, i.e., there-sampled pixel values for all the 64 re-sampled pixels Q [0] to Q [63]are stored in the memory.

After the re-sampling process in the step S147 (FIG. 24) has beencarried out in this manner, a direct current component elimination andnormalization process is performed in a next step S149 according to thesubroutine in FIG. 27. This direct current component elimination andnormalization process is performed with the aim of increasing theidentification accuracy because there are differences in brightnesslevel and contrast in the entire design from card to card, and iteliminates a direct current component from the pixel data array to beidentified (re-sampled pixel values) for normalization.

More specifically, an average value of all the pixel data (re-sampledpixel values here) is calculated in a step S171 of FIG. 27, and theelimination of the direct current component is performed in a step S173.That is, each re-sampled pixel value is calculated again as “re-sampledpixel value−average value”. Next, a mean deviation is determined bycalculating an average of absolute values of all the re-sampled pixelvalues in a step S175. After that, saturation calculation ({re-sampledpixel value×positive maximum value/2}÷mean deviation) is performed in astep S177, which normalizes each re-sampled pixel value in which thedirect current component has been eliminated.

At a stage where the step S149 of FIG. 24 is completed in this manner,the internal RAM stores 64 re-sampled pixel values for designdetermination. Under these conditions, it is determined in a succeedingstep S151 which card has been photographed at that time, referring to orsearching the database 67A shown in FIG. 7 (and the database 67B shownin FIG. 8). In this step S151, in order to determine a similaritybetween the pixel data array to be identified (re-sampled pixel values)and the pixel data array for comparison (the database 67A), Euclideandistance, for example, is used to identify a card ID in the pixel dataarray for comparison with the shortest distance, as a card ID for thecard photographed at that time. The subroutine for database search ismore specifically described in FIG. 28 and FIG. 29.

In a first step S179 of FIG. 28, “0” is set to index counters x and y.The index x is an index showing an entry number in the database 67Ashown in FIG. 7. The index y is an index showing the number ofidentification candidates.

In a next step S181, the processor 64 evaluates squares of differencesbetween respective elements of the pixel data array Q to be identified(re-sampled pixel values) and respective elements of an x-th entry Ax inthe database 67A of FIG. 7, and calculates a sum total of the squares.More specifically, this embodiment employs, as an algorithm for matchingdetection, a method by which differences between all the elements of theidentification pixel data array, i.e. the re-sampled pixel values andall the elements of the entry are calculated with respect to all theentries preset in the database (entries #0 to #127: FIG. 7 in thisembodiment) and the entry with the smallest sum total of differences isidentified as a matching card ID (identification number). In thisembodiment, however, a sum total D of the squares of differences iscalculated so as to emphasize differences among the elements for easyidentification. Thus, it may be possible to determine either the sumtotal of absolute values of differences or the sum total of the squaresof differences.

In addition, the sum total D determined in this step S181 is included inthe concept of “distance” for determining a similarity betweenmulti-dimensional data arrays and, more specifically, this correspondsto Euclidean distance. For such a distance, Hamming distance, etc. maybe utilized besides Euclidean distance.

In a succeeding step S183, the processor 64 determines whether or notthe sum total D determined in the step S181 is smaller than apredetermined threshold value. This step is performed so as not to savethe sum total D as a candidate if it exceeds the predetermined valuebecause a difference from the reference value in the database wouldbecome too large.

If “YES” is determined in the step S183, the sum total D is smaller thanthe threshold value and thus the above mentioned x as a card ID isstored in the memory together with the value of the sum total D, whichare elements of a structure array R [y]. Then, the number of candidatesy is incremented in a step S187, and also the entry number x isincremented in a step S189 in order to carry out entries into thedatabase 67A. In a step S191, it is determined whether or not the entrynumber x has reached the total number of entries (“128” in thisembodiment) in the database 67A. If “NO”, the steps S181 to S189 arerepeatedly executed. Then, when the process for all the elements(re-sampled pixel values) of the determination pixel data has beencompleted, “YES” is determined in a step 191, and the process goes on toa succeeding step S193.

In the step S193, the processor 64 determines whether or not the numberof identification candidates y is “0”. If “YES” is determined in thestep S193, the sum total D exceeds the threshold value for all theentries. In this case, a return value “No card is matching” isestablished in a next step S195, and the process is returned to a stepS153 of FIG. 24.

If “NO” is obtained in the step S193, it is determined whether or notthe number of candidates y is “1” in a next step S197. The existence ofonly one candidate means that the card to be identified is none otherthan that candidate. In that case, therefore, the card ID for thecandidate structure R [0] is set as a return value in a next step S199,and the process is returned to the step S153 (FIG. 24).

If “NO” is determined in the previous step S197, the number ofidentification candidates y is “2” or more, that is, a plurality ofidentification candidates are left. In this case, the candidates need tobe narrowed down into one. After that, the process thus moves on to theprocess of the flowchart in FIG. 29.

In a step S201 of FIG. 29, the processor 64 sorts y candidates R foridentification in ascending order of the sum total D calculated in thestep S181 (FIG. 28), and sets “1” to the index counter y in a next stepS203. More specifically, out of the identification candidates R arrangedin ascending order of the sum total D, the candidate with the secondsmallest D is designated. The candidate with the smallest D is R [0].

Then, in a step S205, the processor 64 calculates a difference Dif A inD between the candidate R [1] at that time and the candidate R [0] withthe smallest D. That is, the Dif A between each candidate R [y] and thesmallest candidate R [0] is figured out in the step S205. Then, in astep S207, it is determined whether or not the difference Dif A islarger than a predetermined threshold value A. In other words, it isdetermined whether or not the degree of similarity between the candidatestructure R [0] with the smallest D and the candidate structure R [y] atthat time is larger than the threshold value A, that is, whether or notit is meaningful to save the candidate structure R [y] as a candidate.

If “NO” is determined in the step S207, that is, if it is determinedthat the candidate R[y] should be saved as a candidate, then adifference Dif B in D between adjacent ones of the candidate structuresthat have been sorted in ascending order of D in the step S201, iscalculated in a succeeding step S209. That is, the D of an immediatelypreceding candidate R [y−1] is subtracted from the D of each candidate R[y]. Then, it is determined in a step S211 whether or not the differenceDif B is larger than a predetermined threshold value B. Morespecifically, it is determined whether or not the degree of similaritybetween the adjacent ones of the candidates sorted in increasing orderof D is larger than the threshold value B, that is, whether or not it ismeaningful to save the candidate structure R [y] as a candidate.

If “YES” is determined in the step S207 or the step S211, as statedabove, it is not meaningful to save the candidate structure R [y] as acandidate, and thus the structure R [y] and later ones are excluded fromthe identification candidates in a next step S213.

Then, it is determined in a step S215 whether or not only one candidatestructure R is left as a consequence. If “NO” is determined in the stepS215, there left a plurality of candidate structures. In that case, thedatabase 67B of FIG. 8 is referred to and searched for any entrymatching one of combinations of card IDs of the left candidates in astep S217. That is, it is determined in the step S217 whether or not thetwo (2) or more left candidates R match any one entry in the database67B. The database 67B, as described above, lists in sequence thecombinations of card IDs which are left as identification candidates.Then, in the step S217, it is determined whether or not there is any oneof the combinations of card IDs for the left plurality of candidatesthat matches any one of combination patterns of card IDs listed in thedatabase 67B. Next, it is determined in a step 219 whether or not thereis any entry with a matching design.

If “YES” is determined in the step S219, a card identification number(ID) indicated by the entry having the matching design is established asa return value, and the process returns to the step S153 of FIG. 24.

If “NO” is determined in the step S219, as in case where “NO” isdetermined in the previous step S215, the card ID of the candidate R [0]with the smallest D at a top of the sequence sorted in the step S201, isestablished as a return value in a step S223, and the process returns tothe step S153 of FIG. 24.

If “NO” is determined in the step S211, that is, if the difference Dif Ain D between each structure and the structure R [0] with the smallest Dis smaller than the threshold value A and also the difference Dif Bbetween adjacent ones of the sorted structures is smaller than thethreshold value B, the index y is incremented so as to designate thenext (the third or later) structure in a step S225. Then, it isdetermined in a next step S227 whether or not all the structures havebeen processed. Accordingly, if “NO” in the step S227, the processreturns to the step S205 to repeatedly perform the steps S205 to S211.If “YES” in the step S227, the process moves on to the step S217.

In this way, by searching the database 67A (and the database 67B) in thestep S151 of FIG. 24, a return value is returned as a search result fromone of the steps S195, S199 (both are shown in FIG. 28), S221 and S223(both are shown in FIG. 29). Then, the game processor 64 determines inthe step S153 whether or not the return value is “No card is matching”,that is, whether or not there is any return value with ID from the stepS195. If “NO”, the card ID of the entry identified in the step S199,S221 or S223 is established as a return value, and the process isreturned to the game play routine (a step S121 of FIG. 23). If “YES”, areturn value “No card is matching” is established, and the process isreturned to the step S121.

Returning to FIG. 23, it is determined in the step S121 whether or notthe return value from the previous step S119 is “No card is placed”. If“YES”, the process returns to the previous step S115. If “NO”, theprocess moves to a next step S123 so as to determine whether or not thereturn value is “No card is matching”. If “YES” is determined in thestep S123, a message “This card is not identifiable. Set a correct cardinto the photographing part and press the photographing key.” isdisplayed on the television monitor 14 so as to request the game playerfor card replacement.

Then, if “NO” is determined in the step S123, the processor 64 receivesin a next step S125 the card ID indicated by the return value in eachcase. After that, in a step S127, the processor 64 displays a carddisplay screen 100 indicated by the card ID on the television monitor 14as shown in FIG. 30. The display screen 100 here includes a designportion 102, and the design portion 102 displays a same design as thedesign 31 of the card 30 (FIG. 2). This allows the game player to knowthat the card he inserted into the card insertion slot 28 at that timeis properly recognized. The card screen 100 further includes a nameportion 104, and the name portion 104 displays a name expressing thedesign shown on the design portion 102, “Dragon” in this embodiment. Adescriptive text 106 contained in the card screen 100 is presented in aform of text introducing characteristics of an object (character)expressed by the design and designated by the name. Also, a powerdisplay portion 108 indicates offensive and defensive powers of theobject designated by the name, Offensive power 530000 in the case ofthis embodiment.

In this way, after the card screen 100 is displayed corresponding to theidentified card, in a step S129 the game processor 64 acts as a computerplayer and decides a card ID of the card to be presented for playing amatch. In a step S131, an outcome of the turn is determined from thecards presented by the both players, i.e., the real game player and thecomputer player. When detecting the end of the turn in a step S133, thecomputer player displays a game screen 110 on the television monitor ina step S135 as shown in FIG. 31. Displayed on the game screen 110 are aplayer character 112 showing the computer player played by the gameprocessor and a card character 114 showing the card presented by thecomputer player. Meanwhile, a turn display portion 116 shows the currentturn, and a message display portion 118 displays a message prompting thegame player to insert a card, such as “Set a card into the photographingpart and press the photographing key”.

Also, as a matter of course, the card game itself may be changed asrequired (in game rules, card designs, etc.), and according to that, thegame screen 110 and the card screen 100 may be altered as required.

In addition, the above embodiments are described, taking as an example acard game system on which cards are identified and a match game isplayed with inputs according to the identification results. However, itis needless to say that card identification according to the presentinvention may be applied to amusement (entertainment) systems other thancard game, such as karaoke.

Moreover, in the above described embodiments, the comparison data arraystored in the database is searched for a completely matching orclose-to-matching entry based on a pixel data array generated byphotographing and processing a card design through re-sampling operationor the like, and the card ID of that entry is obtained as output.However, it may be also possible to acquire character string data bysubjecting a pixel data array fetched from photographing operation or adata array after re-sampling to such a process as generally well-knowncharacter recognition.

Furthermore, it may be also possible to simultaneously obtain a card IDand character string data by combining the card identification processand the character recognizing process in the above described embodiment.

Although the present invention has been described and illustrated indetail, it is clearly understood that the same is by way of illustrationand example only and is not to be taken by way of limitation, the spiritand scope of the present invention being limited only by the terms ofthe appended claims.

1. An entertainment apparatus using cards for obtaining inputs from aplurality of cards on each of which a visually human-identifiable designis printed and performing information processing in accordance with theinputs, comprising: a card photographing part, the card defining afootprint having a first dimension and a second dimension perpendicularto the first dimension, the card photographing part including an areahaving a dimension equal to the first dimension, a first structureopposing a first side of the area, a second structure opposing a secondside of the area, the second side being opposite the first side, thefirst and second structures acting to fix the card in contact with thearea; a photographic device that is configured to photograph the designof the card that is fixed in contact with the area of the cardphotographing part and to form a photographic pixel data array; adatabase including a plurality of entries individually corresponding tothe plurality of cards, each of the entries including a pair of a cardID and a comparison data array; a card identifier for searching thedatabase for a specific comparison data array based on the photographicpixel data array and obtaining a card ID pairing up with the specificcomparison data array; and an information processor for performing theinformation processing with the card ID obtained by the card identifieras an input, wherein the photographic device includes an image sensorfor photographing the design and outputting a photographic signal, adata array former for sampling the photographic signal and forming adata array, and a photographic pixel data array former for re-samplingthe data array and forming the photographic pixel data array, whereinthe data array formed by the data array former is constituted by aplurality of pixel data, wherein the photographic pixel data arrayformed by the photographic pixel data array former is constituted by aplurality of photographic pixel data, and wherein the photographic pixeldata array former sequentially extracts a predetermined number of pixeldata of pixels adjacent to each other in an image represented by thephotographic signal from the plurality of pixel data constituting thedata array while the extracted pixel data are changed sequentially, andproduces a single photographic pixel data based upon the extractedpredetermined number of pixel data every time the predetermined numberof pixel data is extracted.
 2. An entertainment apparatus as set forthin claim 1, wherein the data array former samples the photographicsignal at a first resolution, and the photographic pixel data arrayformer re-samples the data array at a second resolution which is lowerthan the first resolution, and the comparison data array includescomparison data corresponding to the second resolution.
 3. Anentertainment apparatus as set forth in claim 1, wherein the databaseincludes card data corresponding to each entry and the informationprocessor includes a card data displayer for displaying the design basedon the card data of the entry corresponding to the card ID obtained bythe card identifier.
 4. An entertainment apparatus as set forth in claim1, further comprising a cartridge connector, wherein the cartridgeconnector is equipped with a memory cartridge and the memory cartridgestores another database.
 5. An entertainment apparatus as set forth inclaim 1, further comprising: a light source for indirectly irradiatinglight to a surface to be photographed of the card fixed in contact withthe area of the card photographing part.
 6. An entertainment apparatusas set forth in claim 1 wherein the first and second structuresconstitute walls of a card insertion slot.
 7. An entertainment apparatusas set forth in claim 2, wherein the card identifier calculates adistance between the photographic pixel data array and the comparisondata array, and obtains the card ID of the entry with the comparisondata array at the shortest distance.
 8. An entertainment apparatus asset forth in claim 2, wherein the photographic pixel data array formerproduces the single photographic pixel data by calculating a sum of thepredetermined number of pixel data while a predetermined weight to thepredetermined number of pixel data is assigned.
 9. An entertainmentapparatus as set forth in claim 2, wherein the card identifier includesa threshold value determiner for determining whether or not the sumtotal of differentials is larger than a predetermined threshold value;and excludes any entry with the sum total of differentials larger thanthe predetermined threshold value from identification candidates.
 10. Anentertainment apparatus as set forth in claim 7, wherein the distance isa sum total of absolute values of differentials between respectiveelements of the photographic pixel data array and corresponding elementsof the comparison data array.
 11. An entertainment apparatus as setforth in claim 7; wherein the distance is a sum total of squares ofdifferentials between the respective elements of the photographic pixeldata array and the corresponding elements of the comparison data array.12. An entertainment apparatus as set forth in claim 9; wherein the cardidentifier includes a number-of-candidates determiner for determining atotal number of candidates which are left as a result of determinationby the threshold value determiner, and does not obtain any card ID whenit is determined by the number-of-candidates determiner that the numberof candidates is “0”, and obtains the card ID of the identificationcandidate when it is determined that the number of candidates is “1”.13. An entertainment apparatus as set forth in claim 12, taking thedatabase as a first database, and further comprising a second databaseincluding one or more entries, each of the entries including a pluralityof candidate card IDs and one determination card ID, wherein the cardidentifier includes a number-of-candidates determiner for determiningwhether two or more the identification candidates are left or not,searches the second database for an entry in which there is a matchbetween a combination of card IDs of the left candidates and acombination of the candidate card IDs in the second database when it isdetermined by the number-of-candidates determiner that the number ofcandidates is “two or more” and, if there exists any matching entry,obtains the determination card ID of the entry, obtains thedetermination card ID of the entry.
 14. An entertainment apparatus usingcards, which obtains inputs from a plurality of cards on each of which avisually human-identifiable design is printed and performs informationprocessing according to the inputs, comprising: a card photographingpart, the card defining a footprint having a first dimension and asecond dimension perpendicular to the first dimension, the cardphotographing part including an area having a dimension equal to thefirst dimension, a first structure opposing a first side of the area, asecond structure opposing a second side of the area, the second sidebeing opposite the first side, the first and second structures acting tofix the card in contact with the area; a photographic device that isconfigured to photograph the design of the card that is fixed in contactwith the area of the card photographing part and to form a photographicpixel data array; a card identifier for obtaining a data stringcorresponding to the design from the photographic pixel data array; andan information processor for performing the information processing withthe data string obtained by the card identifier as an input, wherein thephotographic device includes an image sensor for photographing thedesign and outputting a photographic signal, a data array former forsampling the photographic signal and forming a data array, and aphotographic pixel data array former for re-sampling the data array andforming the photographic pixel data array, wherein the data array formedby the data array former is constituted by a plurality of pixel data,wherein the photographic pixel data array formed by the photographicpixel data array former is constituted by a plurality of photographicpixel data; and wherein the photographic pixel data array formersequentially extracts a predetermined number of pixel data of pixelsadjacent to each other in an image represented by the photographicsignal from the plurality of pixel data constituting the data arraywhile the extracted pixel data are changed sequentially, and produces asingle photographic pixel data based upon the extract predeterminednumber of pixel data every time the extractor extracts the predeterminednumber of pixel data is extracted.
 15. An entertainment apparatus as setforth in claim 14 wherein the first and second structures constitutewalls of a card insertion slot.
 16. An entertainment apparatus as setforth in claim 5, further comprising a reflector for diffuselyreflecting light from the light source and letting the light enter thesurface to be photographed.
 17. An entertainment apparatus as set forthin claim 5, further comprising: a photographing part cover for coveringthe card photographing part, the cover having a position correction markon a surface opposite to the photographic device; and a photographicpixel data fetching area corrector for correcting a fetching area ofphotographic pixel data based on the position correction mark, whereinthe photographic device photographs the position correction mark under astate where no card is fixed in the card photographing part.
 18. Amethod of identifying a card by photographing a plurality of cards oneach of which a visually human-identifiable design is printed, includingsteps of: (a) preparing a database including a plurality of entriesindividually corresponding to the plurality of cards, each of theentries including a pair of a card ID and a comparison data array; (b)photographing the design of the card by using an image sensor andobtaining a photographic signal, wherein the card defines a footprinthaving a first dimension and a second dimension perpendicular to thefirst dimension, and a card photographing part includes an area having adimension equal to the first dimension, a first structure opposing afirst side of the area, a second structure opposing a second side of thearea, the second side being opposite the first side, and step (b) isexecuted at a time when the first and second structures act to fix thecard in contact with the area; (c) sampling the photographic signal toform a data array; (d) re-sampling the data array to form photographicpixel data array; (e) searching the database for a specific comparisondata array based on the photographic pixel data array to obtain the cardID pairing up with the specific comparison data array, wherein the dataarray formed in the step (c) is constituted by a plurality of pixeldata, wherein the photographic pixel data array formed in the step (d)is constituted by a plurality of photographic pixel data, and whereinthe step (d) includes (d1) sequentially extracting a predeterminednumber of pixel data of pixels adjacent to each other in an imagerepresented by the photographic signal from the plurality of pixel dataconstituting the data array while the extracted pixel data are changedsequentially, and (d2) producing a single photographic pixel data basedupon the predetermined number of pixel data extracted by the step (d)every time the step (d1) is executed, and (f) executing informationprocessing according to the obtained card ID.
 19. A card identifyingmethod as set forth in claim 18, wherein, in the step (e); a distancebetween the photographic pixel data array and the comparison data arrayis calculated, and the card ID of the entry with the comparison dataarray at the shortest distance is obtained.
 20. A card identifyingmethod as set forth in claim 18, wherein in the step (c) the data arrayis formed by sampling the photographic signal at a first resolution, andin the step (d) the photographic pixel data array is formed byre-sampling the data array at a second resolution which is lower thanthe first resolution.
 21. A card identifying method as set forth inclaim 18 wherein the first and second structures constitute walls of acard insertion slot, and the identifying program makes the processorexecute the step of photographing at a time when the card is in the cardinsertion slot.
 22. A card identifying method as set forth in claim 20,wherein; in the step (e), a distance between the photographic pixel dataarray and the comparison data array is calculated, and the card ID ofthe entry with the comparison data array at the shortest distance isobtained.
 23. A storage medium that is readable by a processor of a cardidentifying apparatus and stores an identifying program by which aplurality of cards on each of which is visually human-identifiabledesign is printed can be identified, the identifying program making theprocessor to execute steps of: (a) preparing a database including aplurality of entries individually corresponding to the plurality ofcards, each of the entries including a pair of a card ID and acomparison data array; (b) photographing the design of the card by usingan image sensor and obtaining a photographic signal, wherein the carddefines a footprint having a first dimension and a second dimensionperpendicular to the first dimension, and a card photographing partincludes an area having a dimension equal to the first dimension, afirst structure opposing a first side of the area, a second structureopposing a second side of the area, the second side being opposite thefirst side, and step (b) is executed at a time when the first and secondstructures act to fix the card in contact with the area; (c) samplingthe photographic signal to form a data array; (d) re-sampling the dataarray to form a photographic pixel data array; (e) searching thedatabase for a specific comparison data array based on the photographicpixel data array to obtain the card ID pairing up with the specificcomparison data array; wherein the data array formed in the step (c) isconstituted by a plurality of pixel data, wherein the photographic pixeldata array formed in the step (d) is constituted by a plurality ofphotographic pixel data, and wherein the step (d) includes (d1)sequentially extracting a predetermined number of pixel data of pixelsadjacent to each other in an image represented by the photographicsignal from the plurality of pixel data constituting the data arraywhile extracted pixel data are changed sequentially, and (d2) producinga single photographic pixel data based upon the predetermined number ofpixel data extracted by the step (d1) every time that the step (d1) isexecuted, and (f) executing information processing according to theobtained card ID.
 24. A storage medium as set forth in claim 23 whereinthe first and second structures constitute walls of a card insertionslot, and the identifying program makes the processor execute the stepof photographing at a time when the card is in the card insertion slot.